package com.my.behaviourtype.chain.next;

import java.util.ArrayList;
import java.util.List;

public class Main {

	public static void main(String[] args) {
		Handler h1 = new Handler(){

			@Override
			public void handle(String req, String resp) {
				System.out.println("h1()");
				this.next.handle(req, resp);
			}
		};
		
		List<Handler> handlers = new ArrayList<Handler>();
		handlers.add(h1);
		
		ActionHandler ah = new ActionHandler("actionMapping");
		
		Handler h = HandlerFactory.getHandler(handlers, ah);
		h.handle("req", "resp");
		
		
	}

}
